/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package main;

import java.awt.Point;
import java.text.DecimalFormat;
import java.util.LinkedList;
import java.util.Scanner;

/**
 *
 * @author julio
 */
public class Main {

    public static int getDistanciaAoQuadrado(Point p1, Point p2){
        int parcelaX = p2.x - p1.x;
        int parcelaY = p2.y - p1.y;

        return (parcelaX * parcelaX) + (parcelaY * parcelaY);
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        while(true){
            int number = sc.nextInt();

            if(number == 0)
                break;

            LinkedList<Point> list = new LinkedList<Point>();
            int menorDistancia = 10000;
            int distCorrente = 0;

            for (int i = 0; i < number; i++) {
                int x = sc.nextInt();
                int y = sc.nextInt();

                list.add(new Point(x,y));
            }

            for(int i = 0; i < list.size(); i++){
                for(int j = i + 1; j < list.size(); j++){
                    distCorrente = getDistanciaAoQuadrado(list.get(i), list.get(j));
                    if(distCorrente < menorDistancia){
                        menorDistancia = distCorrente;
                    }
                }
            }

            DecimalFormat decimal = new DecimalFormat( "0.0000" );

            if(menorDistancia >= 10000)
                System.out.println("INFINITY");
            else
                System.out.println(decimal.format(Math.sqrt(menorDistancia)));
        }
    }
}
